import React, {Component} from 'react';
import './style.css'

class NavBar1 extends Component {
  constructor(props) {
    super(props);
  }

  render() {
    const {leftCmp, centerCmp, rightCmp} = this.props
    return (
        // 方式2：使用props实现插槽
        <div className='nav-bar'>
          <div className='left'>{leftCmp}</div>
          <div className='center'>{centerCmp}</div>
          <div className='right'>{rightCmp}</div>
        </div>
    );
  }
}

export default NavBar1;